ImageStorageHorizontal

A fairly simple image storage type using a horizontal scan line memory order.

Will automatically deallocate its memory when it goes out of scope. Should not be copied or moved around.

Constructors

this
this(size_t width, size_t height, IAllocator allocator)
this
this(size_t width, size_t height, shared(ISharedAllocator) allocator)

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

getPixel
Color getPixel(size_t x, size_t y)
getPixel
Color getPixel(size_t x, size_t y)
opIndex
Color opIndex(size_t x, size_t y)
opIndex
Color opIndex(size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(Color value, size_t x, size_t y)
opIndexAssign
void opIndexAssign(Color value, size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
resize
bool resize(size_t newWidth, size_t newHeight)
Undocumented in source. Be warned that the author may not have intended to support it.
resize
bool resize(size_t newWidth, size_t newHeight)
setPixel
void setPixel(size_t x, size_t y, Color value)
setPixel
void setPixel(size_t x, size_t y, Color value)

Properties

height
size_t height [@property getter]
height
size_t height [@property getter]
width
size_t width [@property getter]
width
size_t width [@property getter]

Examples

import std.experimental.color;
ImageStorageHorizontal!RGB8 image = ImageStorageHorizontal!RGB8(1, 1);
image.resize(2, 2);

assert(image.width == 2);
assert(image.height == 2);
assert(image[1, 1] == image[0, 0]);

See Also

ImageStorage

Meta